﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class TestUI : MonoBehaviour {

    public Text ip;
    public Text port;
    public Text wanfa;
    public Text hufa;
    public Text GameType;
    public Button btnStart;
    
	// Use this for initialization
	void Start () {
	    
	}
	
    public void OnClick()
    {
        robot.host = ip.text;
        robot.port = System.Convert.ToInt32(port.text);
        robot.gWanfa = System.Convert.ToInt32(wanfa.text);
        robot.gHufa = System.Convert.ToInt32(hufa.text);
        robot.GameType = System.Convert.ToInt32(GameType.text);

        GameObject nobj = new GameObject();
        var ret = nobj.AddComponent<robot>();
        ret.CreateGame();
    }
	// Update is called once per frame
	void Update () {
	
	}
}
